<%@ page import="controllers.SolutionConnect" %>
<%@ page import="controllers.ajxAdoptionSolutionConnectServlet" %>
<%@ page import="java.util.List,java.text.*"%>
<%@ page import="java.util.List, java.util.HashMap" %>
<%@ page import="controllers.CommonConnect" %>
<%

String _Benefits = (String) request.getParameter("chkBenefits");
CommonConnect Com = new CommonConnect();
String optionName; 

int iRow =0;
if (_Benefits == null) _Benefits="";



ajxAdoptionSolutionConnectServlet SOL = new ajxAdoptionSolutionConnectServlet();
List<HashMap<String,Object>> rs = SOL.getAllAdoption(_Benefits);

List<HashMap<String,Object>> rsMonthOfYear = Com.getMonthOfYear();
List<HashMap<String,Object>> rsRegion = Com.getRegion();


%>



<!-- content -->
<!--<a id="mainContent" name="mainContent"/>-->
<div id="lotusContent">
<div class="lotusLayout lotusHeader">
<!--<h1>Savvy Solutions</h1>
<div class="lotusDetails">The Global Operations Excellence collection of Savvy Solutions resulting in cost savings for the company</div>-->
</div>
<!-- View selector -->
<div class="lotusActionBar lotusBtnContainer">
<!-- Buttons -->


<b>Best of Sites </b>
</div>


<table><tr>
<td width="40%"><b>Select Primary Benefit Category:   </b></td>
<td width="250px">
<input name="%%Surrogate_cmbPrimaryBenefit" type="hidden" value="1">
<select name="cmbPrimaryBenefit" id="chkBenefits" class="text-edit">
<option selected>--Select Primary Benefit Category--
<option>Safety
<option>Quality
<option>Order Lead Time
<option>Customer satisfaction
<option>Employee engagement</select>
</td>
<td width="200px"><span class="lotusBtn lotusBtnAction lotusLeft"><a href="javascript:getPrimaryBenefit()"><b>Show</b></a>
</span></td>
</tr></table><br>
        <script src="/scripts/jquery.js" type="text/javascript"></script>
        <script src="/scripts/jquery.dataTables.min.js" type="text/javascript"></script>
        <script type="text/javascript">
        $(document).ready(function () {
            $("#draft").dataTable({
                "sPaginationType": "full_numbers",
                "bJQueryUI": true
            });
                       
        });
        </script>

<% if ( !_Benefits.equals("") && !_Benefits.startsWith("--") ){ %>
<h1>Search for : <%= _Benefits%></h1>
<%}%>        
<div id="dt_example">
    <div id="container">
        <div id="demo_jui">
      <table id="draft" class="display">
          <thead>
              <tr>      
                    <th>Solution ID </th>
                    <th># of Adoptions  </th>
                    <th>Original Achieved Benefit </th>
                    <th>Cumulative Achieved Benefit through Adoption </th>
                    <th>Total Annual Production </th>
                    <th>Average Adopted Feedback Indicator </th>
                    <th>Total Time Saved through Adoption </th>
                  
              </tr>
          </thead>
          <tbody>
                <% for(int i = 0 ; i < rs.size() ;i++)
                { 
                	//float PB = (Float) rs.get(i).get("hardSavings") + (Float) rs.get(i).get("costAvoidance") + (Float) rs.get(i).get("oppurtunityCost");
                
                
                %>
          <tr>
            <td><a href="/modules/default/find-detail-adopted-mysolution.jsp?sol_id=<%=rs.get(i).get("SolID")%>"><%=rs.get(i).get("SolCode")%></a></td>
            <td><a href="/modules/default/find-detail-adopted-mysolution.jsp?sol_id=<%=rs.get(i).get("SolID")%>"><%=rs.get(i).get("OfAdop")%></a></td>
            <td><a href="/modules/default/find-detail-adopted-mysolution.jsp?sol_id=<%=rs.get(i).get("SolID")%>"><%=rs.get(i).get("Original")%></a></td>
            <td><a href="/modules/default/find-detail-adopted-mysolution.jsp?sol_id=<%=rs.get(i).get("SolID")%>"><%=rs.get(i).get("New")%></a></td>
            <td><a href="/modules/default/find-detail-adopted-mysolution.jsp?sol_id=<%=rs.get(i).get("SolID")%>"><%=rs.get(i).get("TotalAmount")%></a></td>
            
            
            <td><a href="/modules/default/who-adopted-mysolution.jsp?sol_id=<%=rs.get(i).get("SolID")%>">
            <% long rank = Long.parseLong( rs.get(i).get("easyRankDesc").toString());%>
            <% if (rank > 0 && rank <=0.6 ){ %>
                <img src="/img/rating1.gif">
            <%}else if  (rank > 0.6 && rank <=1.2 ){ %>
                <img src="/img/rating2.gif">
            <%}else if  (rank > 1.2 && rank <=1.8 ){ %>
                <img src="/img/rating3.gif">
            <%}else if  (rank > 1.8 && rank <=2.4 ){ %>
                <img src="/img/rating4.gif">
            <%}else if  (rank > 2.4 && rank <=3 ){ %>
                <img src="/img/rating5.gif">
            <%}%>
            <br>
            <img src="/img/HandShake.gif" height="20px" width="20px" >
            <%=rs.get(i).get("easyRankDesc")%></a></td>
            
            
            <td><a href="/modules/default/who-adopted-mysolution.jsp?sol_id=<%=rs.get(i).get("SolID")%>"><%=rs.get(i).get("Totaltime")%></a></td>
          </tr>
        <% } %>
          </tbody>
      </table>
      </div>
    </div>
</div>



<!--End of Lotus Content-->
</div>
<!--End of Lotus Main-->
</div>
<!-- Footer gets moved to within Frame div in weblog.vm so closing tags need to go in weblog.vm - MTodd November 1 2007 </body> </html> -->
</div>
</div>
<input name="Remote_User" type="hidden" value="CN=Wai Tat See/OU=SG/OU=Asia/O=Celestica">
<input name="SaveOptions" type="hidden" value="0">
<input name="HTTP_Cookie" type="hidden" value="redirectto=/global/collaboration/SavvySol.nsf/frmsavvy%3FOpenForm%26login; LtpaToken=ZDKFFoPfuAGbPyVskMUDPgxWENdj6diTwzdqpeE75D7FBQstuBp54bmVG+1NUJgipQeljrUEAnGe8B8Hy4xO6Ip1B52UiBE2D38M/XtiBuuR1VTHf9sxTVPakjCO9kRh+u37exCde0HW4anckpDjCjBca3xmtNzAztKf7ZrCju09loEt1Bbj4tXt3D3Jwfgtr7mnXY7p99bsDfsdzGSxIGE0B5FexyBHR/02R0sCOp7AvkieyyEV4PETctlJwZT8Ll6bckcIDlUK80b0FuGcQHsOp/aCxwhm6H6EjZNBuiuuBsLGX6COlAyNIofKNnjmdvfdhh6/RrWFw9ttyxMbKs33t1bWwTIdLBpGwcEg748=">
<input name="Query_String_Decoded" type="hidden" value="OpenForm&amp;login">
<input name="Query_String" type="hidden" value="OpenForm&amp;login">
<input name="dbName" type="hidden" value="global/collaboration/SavvySol.nsf">
<input name="Position" type="hidden" value="">
<input name="curUsername" type="hidden" value="CN=Wai Tat See/OU=SG/OU=Asia/O=Celestica">
<input name="QuickSearch" type="hidden" value="0">
<input name="UserProfileInfo" type="hidden" value="">
<input name="txtProfileUNID" type="hidden" value="">